﻿<UserControl
    x:Class="SoapServiceExample.Forecast"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:SoapServiceExample"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:data="using:SoapServiceExample.Data"
    mc:Ignorable="d"
    d:DesignHeight="768"
    d:DesignWidth="1024">

    <Grid d:DataContext="{Binding Source={d:DesignInstance Type=data:DesignForecast, IsDesignTimeCreatable=True}}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" Margin="10">
            <TextBlock Text="{Binding City}" Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock Text="," Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock Text="{Binding State}" Style="{StaticResource HeaderTextBlockStyle}" Margin="20 0 0 0"/>
        </StackPanel>
        <TextBlock Grid.Row="1" 
                    Text="{Binding Result}" 
                    Style="{StaticResource SubheaderTextBlockStyle}"
                    Margin="0,0,0,40"/>
        <GridView Grid.Row="2" ItemsSource="{Binding Forecast}">
            <GridView.ItemTemplate>
                <DataTemplate>
                    <local:ForecastEntry/>
                </DataTemplate>
            </GridView.ItemTemplate>
            <GridView.ItemsPanel>
                <ItemsPanelTemplate>
                    <WrapGrid MaximumRowsOrColumns="1"/>
                </ItemsPanelTemplate>
            </GridView.ItemsPanel>
        </GridView>
    </Grid> 
</UserControl>
